package com.fy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fy.search.dto.CommodityDto;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author xiaocheng
 * @since 2022-06-08
 */
public interface CommodityMapper extends BaseMapper<CommodityDto> {
    /**
     * @return
     */
    @Select("SELECT commodity_id,shop_id,shop_name,commodity_name,commodity_img,sales,price FROM commodity")
    List<CommodityDto> findAll();

    @Select("SELECT commodity_id,shop_id,shop_name,commodity_name,commodity_img,sales,price FROM commodity where shop_id=#{shopId}")
    List<CommodityDto> findId(Integer shopId);


}
